package cn.ltpcloud.admin;

import cn.ltpcloud.common.runner.AnonymousRunner;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.servers.Server;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 筋斗云后端
 *
 * @author jiejiebiezheyang
 * @since 2024-03-01 10:00
 */
@OpenAPIDefinition(servers = {@Server(url = "/", description = "Default Server URL")})
@SpringBootApplication(scanBasePackages = "cn.ltpcloud")
@MapperScan("cn.ltpcloud.**.mapper")
public class Application {


    public static void main(String[] args) throws Exception {
        System.setProperty("pagehelper.banner", "false");
        System.setProperty("log4j.skipJansi", "false");
        AnonymousRunner.run();
        SpringApplication.run(Application.class, args);
        String datetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        System.out.println(datetime + ": \u001B[36m somersault-cloud-wechat successfully started\u001B[0m");
    }

}
